package com.example.user.controller;


import com.example.common.entity.Result;
import com.example.user.entity.vo.UserVo;
import com.example.user.service.ISysUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 用户信息表 前端控制器
 * </p>
 *
 * @author cc
 * @since 2022-08-12
 */
@Api(tags = "用户信息管理")
@RestController
@RequestMapping("/sys-user")
public class SysUserController {

    @Autowired
    private ISysUserService userService;

    @ApiOperation("获取所有用户")
    @GetMapping("/users")
    public Result<List<UserVo>> getUsers() {
        return Result.ok(userService.getUsers());
    }

}
